/**
 * Created by mac on 14-5-29.
 */
var localData = {Rows:[
    {"equipmentId":"ROUTER0000001","status":"异常","type":"网络断开","description":"请检查该设备是否通电，网络是否连通"}
]};
$(initGrid);
var grid = null;
function initGrid() {
    grid = $("#maingrid").ligerGrid({
        columns: [
            {display: '路由器编号',name: 'equipmentId', width: '20%'},
            {display: '状态',name: 'status', width: '10%'},
            {display: '故障类型',name: 'type', width: '10%'},
            {display: '故障描述',name: 'description', width: '60%'}
        ],
        checkbox: false, enabledEdit: true,clickToEdit: false,selectRowButtonOnly: true,rownumbers:false,
        data:localData,
        //dataAction: 'server',
       // url: '@{system.SellerAccounts.getSellerAccountData()}',
        sortname: 'createdTime',usePager: 'true',pageSize: 50, width: '100%',height:'100%',
        onSelectRow: function(row, rowindex) {
            $("#txtrowindex").val(rowindex);
        },
        onAfterShowData: function(grid) {
            if ($.fn.ligerCheckBox) $(".l-grid-body input:checkbox,.l-grid-hd-cell input:checkbox", grid).ligerCheckBox({
                css: {
                    marginTop: 3
                }
            });
        }
    });
}